package com.example.pojo.vo;

import com.example.pojo.TestQuestion;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class TestPaperForTestVo {

    private Integer id;        // 编号
    private String type;//单选题，多选题，判断题
    private String question;//题目
    private String ans;
    //四个选项
    private String a;
    private String b;
    private String c;
    private String d;
    private Integer agencyId;//所属机构编号

    private Double score;//分值


    // 构造器
    public TestPaperForTestVo(TestQuestion testQuestion, Double score) {
        this.id = testQuestion.getId();
        this.type = testQuestion.getType();
        this.question = testQuestion.getQuestion();
        this.ans = testQuestion.getAns();
        this.a = testQuestion.getA();
        this.b = testQuestion.getB();
        this.c = testQuestion.getC();
        this.d = testQuestion.getD();
        this.agencyId = testQuestion.getAgencyId();
        this.score = score;
    }
}
